package com.itheima.sync.controller;

import com.itheima.sync.service.DataSyncService;
import entity.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wang
 * @description
 * @date 2021/7/31 9:29
 */
@RestController
@RequestMapping("/datasync")
public class DataSyncController {
    @Autowired
    private DataSyncService dataSyncService;

    @GetMapping("/importAll")
    public Result importAll(){
        dataSyncService.importAll();
        return new Result(true,"操作成功");
    }
}
